package models;

import play.*;
import play.data.binding.As;
import play.data.validation.Required;
import play.db.jpa.*;

import javax.persistence.*;
import java.util.*;

@Entity
@Table(name = "availabilities")
public class Availabilitie extends Model {

    @Required
    @As("dd/MM/yyyy")
    public Date date;
    @Required
    @OneToOne
    public Employee employee;
    @Required
    @OneToOne
    public Vehicule vehicule;
    @Required
    @OneToOne
    public Circuit circuit;

    public Availabilitie(@As("dd/MM/yyyy") Date date, Employee employee, Vehicule vehicule, Circuit circuit) {
        this.date = date;
        this.employee = employee;
        this.vehicule = vehicule;
        this.circuit = circuit;



    }
}
